﻿using System;
using System.Collections.Generic;
using System.Xml;
using System.Text;

namespace BfLib.Web.RSS
{
    public class RSSChannelTextInput
    {
        private string _title, _description, _name, _link;

        public RSSChannelTextInput(XmlNode node)
        {
            if (node == null)
                return;

            XmlNode n;

            n = node.SelectSingleNode("title");
            if(n!=null)
                this._title = n.Value;

            n = node.SelectSingleNode("description");
            if(n!=null)
                this._description = n.Value;

            n = node.SelectSingleNode("name");
            if(n!=null)
                this._name = n.Value;

            n = node.SelectSingleNode("link");
            if(n!=null)
                this._link = n.Value;

        }

        #region Public accessors

        public string Link
        {
            get { return _link; }
        }

        public string Name
        {
            get { return _name; }
        }

        public string Description
        {
            get { return _description; }
        }

        public string Title
        {
            get { return _title; }
        }

        #endregion


    }
}
